'callback' => 'processRow',
];
+ /** @var LocalRepo|null */
+ private $repo;
+
public function __construct() {
parent::__construct();
$this->addDescription( 'Script to clean up broken, unparseable upload filenames' );
* @return string
*/
private function filePath( $name ) {
- if ( !isset( $this->repo ) ) {
+ if ( $this->repo === null ) {
$this->repo = RepoGroup::singleton()->getLocalRepo();
}
class CompareParsers extends DumpIterator {
private $count = 0;
+ /** @var bool */
+ private $saveFailed;
+ /** @var bool */
+ private $stripParametersEnabled;
+ /** @var bool */
+ private $showParsedOutput;
+ /** @var bool */
+ private $showDiff;
+ /** @var ParserOptions */
+ private $options;
+ /** @var int */
+ private $failed;
public function __construct() {
parent::__construct();
* @ingroup Maintenance
*/
abstract class DumpIterator extends Maintenance {
-
private $count = 0;
private $startTime;
+ /** @var string|bool|null */
+ private $from;
public function __construct() {
parent::__construct();
$revision->setTitle( Title::newFromText(
rawurldecode( basename( $this->getOption( 'file' ), '.txt' ) )
) );
+ $this->from = false;
$this->handleRevision( $revision );
return;
}
$this->count++;
- if ( isset( $this->from ) ) {
+ if ( $this->from !== false ) {
if ( $this->from != $title ) {
return;
}
public $imageBasePath = false;
/** @var array|false */
public $nsFilter = false;
+ /** @var bool|resource */
+ public $stderr;
+ /** @var callable|null */
+ protected $importCallback;
+ /** @var callable|null */
+ protected $logItemCallback;
+ /** @var callable|null */
+ protected $uploadCallback;
+ /** @var int */
+ protected $startTime;
function __construct() {
parent::__construct();
public $dumpUploadFileContents = false;
public $orderRevs = false;
public $limitNamespaces = [];
+ /** @var bool|resource */
+ public $stderr;
protected $reportingInterval = 100;
protected $pageCount = 0;
protected $ID = 0;
+ /** @var int */
+ protected $startTime;
+ /** @var int */
+ protected $pageCountPart;
+ /** @var int */
+ protected $revCountPart;
+ /** @var int */
+ protected $maxCount;
+ /** @var int */
+ protected $timeOfCheckpoint;
+ /** @var ExportProgressFilter */
+ protected $egress;
+ /** @var string */
+ protected $buffer;
+ /** @var array|false */
+ protected $openElement;
+ /** @var bool */
+ protected $atStart;
+ /** @var string|null */
+ protected $thisRevModel;
+ /** @var string|null */
+ protected $thisRevFormat;
+ /** @var string */
+ protected $lastName;
+ /** @var string */
+ protected $state;
+
/**
* The dependency-injected database to use.
*
* @ingroup Maintenance
*/
class MWDocGen extends Maintenance {
+ /** @var string */
+ private $doxygen;
+ /** @var string */
+ private $mwVersion;
+ /** @var string */
+ private $output;
+ /** @var string */
+ private $input;
+ /** @var string */
+ private $inputFilter;
+ /** @var string */
+ private $template;
+ /** @var string[] */
+ private $excludes;
+ /** @var string[] */
+ private $excludePatterns;
+ /** @var bool */
+ private $doDot;
+ /** @var bool */
+ private $doMan;
/**
* Prepare Maintenance class
/* Variables for dressing up as a parser */
public $mTitle = 'PreprocessDump';
public $mPPNodeCount = 0;
+ /** @var Preprocessor */
+ public $mPreprocessor;
public function getStripList() {
$parser = MediaWikiServices::getInstance()->getParser();
class PPFuzzTest {
public $templates, $mainText, $title, $entryPoint, $output;
+ /** @var PPFuzzTester */
+ private $parent;
+ /** @var string */
+ public $nickname;
+ /** @var bool */
+ public $fancySig;
+
/**
* @param PPFuzzTester $tester
*/
* @ingroup Maintenance
*/
class ImageBuilder extends Maintenance {
-
/**
* @var IMaintainableDatabase
*/
protected $dbw;
+ /** @var bool */
+ private $dryrun;
+
+ /** @var LocalRepo|null */
+ private $repo;
+
+ /** @var int */
+ private $updated;
+
+ /** @var int */
+ private $processed;
+
+ /** @var int */
+ private $count;
+
+ /** @var int */
+ private $startTime;
+
+ /** @var string */
+ private $table;
+
function __construct() {
parent::__construct();
* @return LocalRepo
*/
function getRepo() {
- if ( !isset( $this->repo ) ) {
+ if ( $this->repo === null ) {
$this->repo = RepoGroup::singleton()->getLocalRepo();
}
* @ingroup Maintenance
*/
class RecountCategories extends Maintenance {
+ /** @var string */
+ private $mode;
+
+ /** @var int */
+ private $minimumId;
+
public function __construct() {
parent::__construct();
$this->addDescription( <<<'TEXT'
private $count = 0;
private $outputDirectory, $startTime;
+ /** @var string */
+ private $prefix;
public function __construct() {
parent::__construct();
/** @var ConcatenatedGzipHistoryBlob|false */
public $cgz;
public $referrers;
+ /** @var array */
+ private $texts;
/**
* Create a transaction from a RecompressTracked object